﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddXunjia.aspx.cs" Inherits="PropertyAppraisal.DoemsKanCha.AddXunjia" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="stylesheet" type="/text/css" href="../easyui/easyui/1.3.2/themes/default/easyui.css" />
    <link rel="stylesheet" type="/text/css" href="../easyui/easyui/1.3.2/themes/icon.css" />
    <script src="../easyui/easyui/1.3.2/jquery-1.8.0.min.js"></script>
    <script type="/text/javascript" src="../easyui/easyui/1.3.2/jquery.easyui.min.js"></script>
    <script src="../easyui/easyui/1.3.2/easyloader.js"></script>

    <script type="text/javascript" src="../easyui/jquery.params.js"></script>
</head>
<body>
    <div class="demo-info">
        <div class="demo-tip icon-tip"></div>    <iframe width="0" height="0" src="../SessionKeeper.aspx"></iframe>   
    </div>
    <div style="margin: 0;"></div>
    <form id="form1" runat="server">
        <div class="easyui-panel" fit="true" style="border: none;">
            <div style="margin-left: 30px;" id="ff">
                <table>
                    <tr>
                        <td>项目号：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-validatebox" id="xiangid" type="text" style="width: 800px;" readonly="true" maxlength="30" />
                        </td>
                    </tr>
                    <tr>
                        <td>建议评估单价(元/㎡)：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-validatebox" id="price" type="text" style="width: 800px;" data-options="required:true" maxlength="30" />
                        </td>
                    </tr>
                    <tr>
                        <td>询价内容及其他：</td>
                        <td style="padding-left: 50px;">
                            <textarea id="message" style="height: 60px; width: 800px;" placeholder="说点什么...最少输入10个字" maxlength="200"></textarea>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="text-align: center; padding: 5px">
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="add()">提交</a>
            </div>
        </div>
    </form>
    <script type="text/javascript">
        //页面初始化 反填项目号
        $(function () {
            var P_ReportNumber = $.query.get("id");//项目号
            $("#xiangid").val(P_ReportNumber);
        })

        //添加询价记录
        function add() {
            var xiangid = $("#xiangid").val();//项目号
            var price = $("#price").val();
            var countent = $("#message").val();

            $.ajax({
                type: "post", //要用post方式                 
                url: "AddXunjia.aspx/XunJiaAdd",//方法所在页面和方法名
                data: "{'xiangid':'" + xiangid + "','price':'" + price + "','countent':'" + countent + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    var json = eval("(" + data.d + ")");

                    if (json == 1) {
                        alert("提交成功");
                    }
                    else
                        alert("提交失败");
                }
            });
        }


    </script>
</body>
</html>
